<template>
	<user-info :name="name" :introduction="introduction"></user-info>
	<function-list :infos='functioninfos'></function-list>
	<function-list :infos='setinfos'></function-list>
</template>
<script>
	import UserInfo from './user/UserInfo'
	import FunctionList from './user/FunctionList'

	export default {
		data: function () {
			return {
				userinfos: {
					name: this.sname,
					introduction: this.sintroduction
				},
				functioninfos: [
					{
						name: '版权',
						hash: 'right'
					},
					{
						name: '收藏夹',
						hash: 'favorite'
					},
					{
						name: '消息',
						hash: 'message'
					},
					{
						name: '私信',
						hash: 'letter'
					}
				],
				setinfos: [
					{
						name: '设置',
						hash: 'set'
					}
				]
			}
		},
		vuex: {
			getters: {
				name: function (state) {
					return state.user.name
				},
				introduction: function (state) {
					return state.user.introduction
				}
			}
		},
		components: {
			UserInfo,
			FunctionList
		}
	}
</script>